<script type="text/javascript" language="javascript" src="./include/DataTables/media/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="./include/DataTables/media/js/dataTables.tableTools.js"></script>
<script type="text/javascript" language="javascript" src="./include/DataTables/media/js/dataTables.colVis.js"></script>
<link rel="stylesheet" type="text/css" href="./include/DataTables/media/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="./include/DataTables/media/css/dataTables.tableTools.css">
<link rel="stylesheet" type="text/css" href="./include/DataTables/media/css/dataTables.colVis.css">
<script type="text/javascript" language="javascript">
    $(document).ready(function() {
        $('#transacciones').DataTable({
            dom: 'C T<"clear">lfrtip',
            "tableTools": {
                "sSwfPath": "./include/DataTables/media/swf/copy_csv_xls_pdf.swf",
                "aButtons": [
                    {
                        "sExtends": "collection",
                        "sButtonText": "Exportar",
                        "aButtons": [
                            {
                                "sExtends": "csv",
                                "sButtonText": "CSV",
                                "sToolTip": "Exportar Archivo Plano",
                                "sFileName": 'pagos.csv'
                            },
                            {
                                "sExtends": "xls",
                                "sButtonText": "Excel",
                                "sToolTip": "Exportar Excel",
                                "sFileName": 'pagos.xls'
                            }
                        ]
                    }
                ]
            },
            "aoColumnDefs": [
                {"bVisible": false, "aTargets": [3, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22]}],
            "colVis": {
                "buttonText": "Ver/Ocultar Columnas",
                exclude: [0]
            },
            "oLanguage": {
                "sLengthMenu": "<div class='dataTables_info'><font size='3'>Mostrando _MENU_ registros por página</font></div>",
                "sZeroRecords": "No existe resultados",
                "sInfo": "<font size='3'><strong> _START_ - _END_ de _TOTAL_ registros</strong></font>",
                "sInfoEmpty": " 0 - 0 de 0 registros",
                "sInfoFiltered": "(Filtro de _MAX_ registros)",
                "sSearch": "<font size='3'>Filtrar:</font>",
                "oPaginate": {
                    "sNext": "<font size='3'>Siguiente</font>",
                    "sPrevious": "<font size='3'>Anterior</font>"
                }
            }
        });
    });
</script>
<div class="block-title">
    Ver Transacciones
</div>
<div id="tabs">
    <ul>
        <li>
            <a title="Cargar Transacciones" href="transacciones.php" target="_self">Cargar Transacciones</a>
        </li>
        <li class="tab_active">
            <a title="Ver Transacciones" href="verTransacciones.php" target="_self">Ver Transacciones</a>
        </li>
    </ul>
</div>
<form action="" method="post" enctype="multipart/form-data">
    <table>
        <tr>
            <td class="head">Numero de Cuenta:</td>
            <td class="odd" style="white-space: nowrap;">
                <input type="text" maxlength="16" name="nro_cuenta" id="nro_cuenta" value="<{$nro_cuenta}>">
            </td>
        </tr>
        <tr>
            <td class="head">Fecha de Proceso: </td>
            <td class="odd" style="white-space: nowrap;">
                <input type="date" name="fec_pro_ini" id="fec_pro_ini" value="<{$fec_pro_ini}>"> - 
                <input type="date" name="fec_pro_fin" id="fec_pro_fin" value="<{$fec_pro_fin}>"> <{$error_fec_pro}>
            </td>
        </tr>
        <tr valign="top">
            <td class="head"></td>
            <td class="odd" style="white-space: nowrap;">
                <input type="submit" value="Filtrar Transacciones" id="submit" name="filtroTransacciones" class="formButton">
            </td>
        </tr>
    </table>
</form>
<br>

<div class="block-title">
    <{if $tabla eq "1"}>Listado Transacciones<{/if}>
    <{if $tabla eq "0"}>No se han encontrado transacciones<{/if}>
</div>
<{if $tabla eq "1"}>
<table id="transacciones" class="display" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>ID</th>
            <th>Beneficiario</th>
            <th>Id Beneficiario</th>
            <th>Tipo</th>
            <th>Fecha Proceso</th>
            <th>No. Cuenta</th>
            <th>Fecha Sistema</th>
            <th>Hora</th>
            <th>Terminal</th>
            <th>Talon</th>
            <th>Vr. Cheque</th>
            <th>Vr. Pesos</th>
            <th>Vr. U. Pesos</th>
            <th>Of. Recaudo</th>
            <th>Motivo</th>
            <th>Ref. 1</th>
            <th>Ref. 2</th>
            <th>Saldo</th>
            <th>Ind. Excento</th>
            <th>Vr. Excentos</th>
            <th>Canal</th>
            <th>Causal Devoluci&oacute;n</th>
            <th>Jornada</th>
        </tr>
    </thead>

    <tbody>
        <{foreach item=transaccion from=$transacciones}>
        <tr>
            <td><{$transaccion.idregistro_registro}></td>
            <td><{$transaccion.beneficiario}></td>
            <td><{$transaccion.idBeneficiario}></td>
            <td><{$transaccion.tipo}></td>
            <td><{$transaccion.fechaProceso}></td>
            <td><{$transaccion.numeroCuenta}></td>
            <td><{$transaccion.fechaSistema}></td>
            <td><{$transaccion.hora}></td>
            <td><{$transaccion.terminal}></td>
            <td><{$transaccion.talon}></td>
            <td><{$transaccion.valorCheque}></td>
            <td><{$transaccion.valorPesos}></td>
            <td><{$transaccion.valorUnidadPesos}></td>
            <td><{$transaccion.oficinaRecaudo}></td>
            <td><{$transaccion.motivo}></td>
            <td><{$transaccion.referenciaUno}></td>
            <td><{$transaccion.referenciaDos}></td>
            <td><{$transaccion.saldo}></td>
            <td><{$transaccion.indicadorExcento}></td>
            <td><{$transaccion.valorExcentos}></td>
            <td><{$transaccion.canal}></td>
            <td><{$transaccion.causalDevolucion}></td>
            <td><{$transaccion.jornada}></td>
        </tr>
        <{/foreach}>
    </tbody>
</table>
<{/if}>